Skip to content

fix: prevent rename from corrupting overlapping entity ids - #2

Merged
danjdewhurst merged 5 commits into
mainfrom
claude/repo-review-ki8rr5
Jun 10, 2026
Merged

fix: prevent rename from corrupting overlapping entity ids#2
danjdewhurst merged 5 commits into
mainfrom
claude/repo-review-ki8rr5

Conversation

@danjdewhurst

Copy link
Copy Markdown
Owner

Entity rename replaced the old id as a raw substring across every
markdown file, so renaming a character with id mara rewrote references
to the distinct character mara-quill and prose words like marathon.
Replace only whole ids by rejecting matches adjacent to id characters.

https://claude.ai/code/session_01Xnb2gMa3UfGKJYRXkjuwNJ

claude added 5 commits June 10, 2026 21:01
Entity rename replaced the old id as a raw substring across every
markdown file, so renaming a character with id mara rewrote references
to the distinct character mara-quill and prose words like marathon.
Replace only whole ids by rejecting matches adjacent to id characters.

https://claude.ai/code/session_01Xnb2gMa3UfGKJYRXkjuwNJ
Removing an entity re-serialized the frontmatter of every markdown file
in the project, even files that never referenced the removed id. That
dropped hand-written YAML comments and dirtied mtimes project-wide.
Only write files whose frontmatter data actually changed.

https://claude.ai/code/session_01Xnb2gMa3UfGKJYRXkjuwNJ
A bare key with no value (e.g. `introduced:`) parsed as an empty list,
so validation reported the confusing error "field introduced must be a
scalar" for what a user wrote as an empty scalar. Parse it as an empty
string, matching how the CLI serializes empty values. Keys followed by
`  - ` items still parse as lists.

https://claude.ai/code/session_01Xnb2gMa3UfGKJYRXkjuwNJ
EPUB 3 requires a dcterms:modified metadata element, which epubcheck
flagged as missing. The DOCX referenced Title and Heading1 paragraph
styles without shipping a styles part, so headings rendered unstyled.
Add the modified timestamp to content.opf and a minimal word/styles.xml
with its relationship and content-type entries.

https://claude.ai/code/session_01Xnb2gMa3UfGKJYRXkjuwNJ
The argument parser treats any next token starting with a dash as a
flag, so space-separated values like --synopsis "-A dash" are silently
dropped. Document the --option=value escape hatch in the help text.

https://claude.ai/code/session_01Xnb2gMa3UfGKJYRXkjuwNJ
@danjdewhurst
danjdewhurst merged commit 8197155 into main Jun 10, 2026
1 check passed
@danjdewhurst
danjdewhurst deleted the claude/repo-review-ki8rr5 branch June 10, 2026 21:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants